$(function(){
	$('#signIn').on('click',function(){
		var adminName= $('#adminName').val();
		var password= $('#adminPassword').val();
		
		$.ajax({
			type : "POST",
			url : "/loginAdmin/loginCheck",
			async : false,
			data : {
				adminName : adminName,
				password : password
			},
			dataType: 'json',
			success:function(data){
				if(data.isSuccess == "ok") {
					location.href = "/userAdmin/userList";
				}else if(data.isSuccess == "adminUserError") {
					BSTYUN.dialog.warn("<span style='color:#000;'>用户不存在！</span>");
				}else if(data.isSuccess == "passwordError") {
					BSTYUN.dialog.warn("<span style='color:#000;'>密码错误！</span>");
				}else if(data.isSuccess == "adminUserInvalid"){
					BSTYUN.dialog.warn("<span style='color:#000;'>用户无效！</span>");
				}
			}
		})
	})
});





